class Person {
  constructor (sex) {
    this.sex = sex
  }

  getSex () {
    console.log(this.sex)
  }
}

// ES6继承
class Student extends Person {
  constructor (id, name, sex) {
    super()
    this.id = id
    this.name = name
    this.sex = sex
  }

  sayHi () {
    console.log(`hi~, my name is ${this.name},my number is ${this.id}`)
  }
}


let s1 = new Student(01, 'niko', 'man')
console.log(s1)
